package boot

import (
	"awesome-devops/applications/tools"
	"gitee.com/jjawesomejj/awesome-util/config"
	"gitee.com/jjawesomejj/awesome-util/helper/commonhelper"
	"gitee.com/jjawesomejj/awesome-util/log"
)

type LogService struct {
}

func (service *LogService) Init() {
	logPath := config.GetConfigByKey("logPath", func() interface{} {
		return "./log/"
	}).(string)
	commonhelper.Mkdir(logPath, 0777)

	tools.Logger = log.FileLoger{
		LogPath: logPath,
	}
}
